Large Scale Structure of the Universe

Written by Stephanie Juneau, NOIRLab, with contributions from Leah Fulmer & Gautham Narayan
Revised by Andres Jaramillo

This notebook is interactive, and we will use it to learn and explore the distribution of galaxies in the universe. We follow a similar approach as other notebooks you might have used, in particular the one written by Gautham Narayan.

Feel comfortable to ask questions as you go along!


Table of Contents


How to Use This Notebook

The webpage you are in is actually an app - much like the ones on your cellphone. This app consists of cells.

An input cell looks like a light grey box with an In [ ]: on its left. Input cells each contain code - instructions to make the computer do something.

To activate or select a cell, click anywhere inside of it.

Select the cell below and read its contents.

To execute or run a selected cell, hit [Shift + Enter] on your keyboard.

Select the cell below and read its contents. Then, run the cell.

Running a cell creates an output directly below it. An output can be some text, a graph, an interactive slider, or even nothing at all! For that last case, you know you have run a cell when the In [ ]: becomes In [#]:, where "#" is any number.

You can learn more about how Jupyter notebooks work at https://try.jupyter.org/


Pre-Activity Setup

In order for any of the activities to work properly, you must import the libraries needed for the code in this notebook.

Select and run the cell below.

Activity 1: How Far Away are Galaxies?

In this activity, you will learn how astronomers measure distances to galaxies. You will get to compare galaxies to figure out which ones are closer or further away from us. You can then use this method for many more galaxies on your own as well!

As in the first notebook, we are going to use data from the Sloan Digital Sky Survey (SDSS). This project used a telescope at Apache Point in New Mexico to look at the northern sky.



Image 1: The Sloan Telescope at Apache Point, New Mexico.
Image Credit: SDSS Team, Fermilab Visual Media Services

The Sloan survey team found millions of stars and galaxies, and made their big data set public. In this activity, we will retrieve and examine galaxy data!

So how did Sloan take spectra of millions of stars and galaxies? The team used metal plates like the one shown below, with a hundreds of holes aligned with the stars and galaxies to be observed. An optical fiber is placed in each hole in order to transfer the light to the instrument and camera. As you will see below, the data are identified by their Plate number, their Fiber number, and the date when they were obtained - the MJD (Modified Julian Date).



Image 2: Holes in aluminum plates let the light from stars and galaxies passed to an optical fiber to the instrument.
Image Credit: D. Long, SDSS-III


Image 3: David Schlegel, Principal Investigator of the BOSS survey (follow-up to SDSS), holding one fiber plug plate.

There were thousands of plates used (~2500 for SDSS), each with 640 fibers, which together gives 1.6 million spectra (including galaxies, stars, and extra spectra on blank sky).


Part 1.1: Plot a Reference Spectrum

A reference spectrum means that it is at redshift zero (not moving toward or away from us). In this case, the reference spectrum is that of a single star.

Helpful Reminder(s)

  • Click anywhere inside of a cell to select it.
  • Hit [Shift + Enter] to run a selected cell.

Part 1.2: Plot a Galaxy Spectrum

Here, you will plot the spectrum of a galaxy. Look for similarities and differences in its shape and lines relative to the reference spectrum.

Quick Question(s)

  • Do you notice differences between the shapes two spectra?
  • Do you notice similar patterns in the line features (dips)?

Part 1.3: Measure Redshifts

The next step here is to overlay a reference spectrum (called a template) onto the galaxy spectra from above.

Remember: A galaxy is a collection of billion of stars, so the shape of the spectrum is not identical to the reference spectrum of a single star. But because the stars have the same elements, notice similar "dips" in the spectra.

Quick Question(s)

  • Do you notice how the galaxy spectrum is shifted with respect to the reference spectrum?

This is what we saw as the redshift due to the expansion of the universe, which causes galaxies to appear to recede away from us.


Part 1.4: Mystery Galaxy

The next step adds four new mystery galaxies to analyze. As with the one before, find the redshift of each of the four mystery galaxies. Compare your answers with the person next to you.

Discussion Question(s)

  • Which galaxy is closer to us and why?

Now, let's check the redshift and learn more information about these galaxies. Click this link. Click "Search" on the left hand side menu bar, and then enter the Plate, Fiber and MJD for any one of the mystery galaxies above (find these in the code), and hit "Go". If you click on the image, you can move around, zoom in and out - it's like Google Maps for the night sky!


Part 1.5: Redshift Ruler

Let's see how far away the four mystery galaxies are compared with each other by placing them on the "redshift ruler" on the white board at the front of the room (if applicable).

What's next?

Well done! You have measured redshifts for two galaxies, which is how astronomers determine distances to galaxies. Remember, the further away a galaxy is from us, the faster is seems to be moving away from us, and the more its light (spectrum) is redshifted! That's because the universe is expanding.

Next, let's see what we can learn if we apply this information to many galaxies. Onward to exploring our vast universe!


Activity 2: Look at the Position of Many Galaxies

Similarly to using coordinates of latitude and longitude, the coordinates on the sky are defined onto a sphere. They are called RA (Right Ascension) and Dec (Declination). There are two illustrations below of these coordinate systems.



Figure 4: Illustration of the celestial coordinate system with RA and Dec. You can read here for an explanation by the SDSS team.


Figure 5: Illustration of the celestial coordinate system with RA and Dec. You can read on Wikipedia about Right Ascension and Declination.

Part 2.1: Selecting Galaxies in a Region of the Sky

Next, we will fetch the positions of galaxies on the sky, and plot their RA and Dec coordinates. Run the cells below to actually fetch the galaxy sample and plot their positions on the sky.

Helpful Reminder(s)

  • Click anywhere inside of a cell to select it.
  • Hit [Shift + Enter] to run a selected cell.

Part 2.2: Adding the 3rd Dimension

We saw before that in order to know the full distribution in 3D, we need to know how far away the galaxies are located. Here, we will add the information from the redshift.

Remember: The larger the redshift, the further away the galaxy!

First, we will plot all galaxies in white, and show galaxies that have approximately the same redshift in yellow. In this first example, we will select for values of redshift with a slider widget. This is done by computing galaxies in a window of $\pm 0.01$ around the value of the redshift slider. We call this an interval of redshift.

Now, instead of showing just one interval of redshift in yellow, we will show the redshift of each galaxy color-coded. Each galaxy is shown with a dot, and each dot will have a color corresponding to the redshift: purple/blue colors mean a low redshift like between $0$ and $0.05$, then green/yellow mean slightly higher redshift like $0.1$, and so on until the higher redshift shown here of $0.2$ in red. Remember that this means that points with exactly the same color are at the same distance from us!

Next, you will make a 3D version of the above 2D plot (same dots but in 3D).

The color bar to the right-hand side shows the correspondence between color and redshift. As mentioned before, points with exactly the same color are at the same distance from us. Purple points are the closest to us, then blue, aqua, green and so on. Think about which galaxies/colors are near and which galaxies/colors are far.

Quick Question(s)

  • Can you use this information to imagine the distribution of galaxies in 3D?
  • Do you notice any structure together at the same distance from us?

Part 2.3: Zooming In and Zooming Out

Now, we will repeat the plots from Part 2.2 above, but with a zoom on a smaller region ("zooming in"), and then over a larger region ("zooming out").

Next, you will make a 3D version of the above 2D plot (same dots but in 3D).

Quick Question(s)

  • Do you see any interesting galaxy structures?
  • What galaxy structures are closer/further from you?

Now, let's step back and plot galaxies over a large region of the sky!

Concluding Question(s)

  1. How many times more galaxies are in the large (zoomed out) view relative to the small (zoomed in) view?
  2. How many times can you fit the small region within the large region? (Hint: compute the size from the axes)
  3. Are those two numbers above the same? What does it mean?
  4. What do you see now on the zoomed out view?
  5. Are those structures smaller or larger?

Part 2.4: Plot Full Sample over Sky Projection

Below, we will again plot the positions of galaxies, and include the information on redshift as the color (but with a different color scheme).

The difference with the steps above is that we will now plot the sample of galaxies over the full sky. The SDSS survey does not cover the full sky, so we will see what we call the "footprint" of the survey. This means the regions of the sky where the telescope was pointed to gather images and spectra.

Hint: for more color maps, you can look at this reference page. For example, you can replace "rainbow" with "autumn_r".